
import random
from ronglian_sms_sdk import SmsSDK

accId = "8aaf07087f77bf96017fddbe68a73301"
accToken = "6c3d9c1b25654fb58032c7a1fd73526d"
appId = "8aaf07087f77bf96017fddbe698e3308"

def sms_code(mobile):
    tid = '1'
    num = random.randint(1000, 9999)
    datas = (num, '5')
    rest = SmsSDK(accId, accToken,appId).sendMessage(tid, mobile, datas)
    return rest,num